#include"comm.hpp"

int main()
{

    int shmid=creatSharemem();

    char* shmadder=(char*)shmat(shmid,nullptr,0);

    Init init;

    int fd=open(Filename,O_WRONLY);

    while(true)
    {
        std::cout<<"I say# ";
        fgets(shmadder,4096,stdin);

        write(fd,"AA",2);
        sleep(10);
        write(fd,"AA",2);
        std::cout<<"server say#"<<shmadder;

        
    }


    int re=shmdt(shmadder);
    
    struct shmid_ds*buf;
    shmctl(shmid,IPC_RMID,nullptr);

    return 0;
}